package aiku.numericalcontroloa.Model.Entity.OrderManagement;

import aiku.numericalcontroloa.Model.Entity.BaseEntity;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
import lombok.EqualsAndHashCode;

import java.io.Serializable;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.Date;

/**
 * 订单账单
 * 订单每一笔的收款记录
 * @TableName order_billing
 */
@EqualsAndHashCode(callSuper = true)
@TableName(value ="order_billing")
@Data
public class OrderBilling extends BaseEntity implements Serializable{

    /**
     * 订单id
     */
    @TableField(value = "order_id")
    private String orderId;

    /**
     * 总期数
     */
    @TableField(value = "total_period")
    private Integer totalPeriod;

    /**
     * 本期
     */
    @TableField(value = "current_period")
    private Integer currentPeriod;

    /**
     * 本期金额
     */
    @TableField(value = "amount")
    private BigDecimal amount;

    /**
     * 收款日/还款日
     */
    @TableField(value = "repayment_date")
    private LocalDate repaymentDate;

    /**
     * 实收金额
     */
    @TableField(value = "funds_received")
    private BigDecimal fundsReceived;

    /**
     * 实收日期
     */
    @TableField(value = "date_received")
    private Date dateReceived;

    /**
     * 收款账户
     */
    @TableField(value = "account")
    private String account;

    /**
     * 订单账单状态（0未收款，1已收款，2欠款/逾期）
     */
    @TableField(value = "bill_status")
    private Integer billStatus;

    /**
     * 财务审核(0未申请，1待审核，2通过，3不通过)
     */
    private Integer examineStatus;

    /**
     * 业务员提成id
     */
    @TableField(value = "salesman_commission_id")
    private String salesmanCommissionId;

    /**
     * 售后员提成id
     */
    @TableField(value ="after_sales_commission_id")
    private String afterSalesCommissionId;
}